import axios from "../http";
import Qs from "qs";
import base from "@/request/base";

/**
 * post方法，对应post请求
 * @desc注册请求
 * @param {String} url [请求的url地址]
 * @param {Object} params [请求时携带的参数]
 */
//获取公告信息接口
export function getBulletins(data) {
    return axios({
        url: `${base.url}/getBulletins`,
        method: 'post',
        data: Qs.stringify(data)
    })
}

//修改公告信息接口
export function updateBulletin(data) {
    return axios({
        url: `${base.url}/updateBulletin`,
        method: 'post',
        data: Qs.stringify(data)
    })
}

//添加公告信息接口
export function addBulletin(data) {
    return axios({
        url: `${base.url}/addBulletin`,
        method: 'post',
        data: Qs.stringify(data)
    })
}

//删除公告信息接口
export function deleteBulletin(data) {
    return axios({
        url: `${base.url}/deleteBulletin`,
        method: 'post',
        data: Qs.stringify(data)
    })
}